1. Field of the Invention
The present invention concerns a device for optimizing the performance of real time primitives of a real time executive kernel in multiprocessor structures, especially, but not exclusively, multiprocessor structures on board an aircraft.
2. Description of the prior art
The execution of a job by a computer uses processors operating in highly disparate time scales. As a result a single complex job cannot use efficiently all the elements of a configuration. It is possible to increase efficiency if the job is broken down into a plurality of simpler jobs ready to be executed.
The fundamental role of the kernel is therefore to create a plurality of virtual machines that are almost independent of each other. This involves organizing how the different elements of the configuration (or resources) are shared between the jobs in progress. The kernel handles input-output management, firstly because the respective units are part of the resources that it monitors and secondly because events associated with input-output usually modify the status of jobs being executed. Finally, the kernel handles auxiliary functions such as date and time management.
To go into more detail, the kernel generates one or more virtual machines which usually have the following properties:
the virtual machine is a multiprocessor capable of executing a plurality of programs apparently simultaneously: to this end the operating system distributes processor time and main memory between entities called "tasks" and may also provide intertask communication mechanisms; PA0 the kernel handles the details of input-output operations: scheduling, error correction and synthesis of complex operations. The programming language of the kernel virtual machine is in the form of an extension of the machine language of the host computer, a special mechanism enabling new instructions called primitives to be created, the role of these primitives being to request intervention of the kernel to execute complex operations. It is at this level that are found the so-called "real time" functions enabling use of devices reserved to the system. PA0 active if it is executing on one of the processors of the configuration; PA0 waiting otherwise; it may be awaiting an event if it has subcontracted an operation to another element of the configuration and is waiting for this to finish; it may equally well be awaiting a resource if it requires a unit that is not available to continue working. PA0 shorter execution times for real time primitives in multiprocessor architectures, PA0 machine (processor type) independence, PA0 a hardware implementation suitable for use on board aircraft (compact overall dimensions, low power consumption), PA0 processing of external events in minimum time, PA0 easy implementation of various kernels, PA0 easy interfacing to high-level language compilers. PA0 a) a first state in which it processes a primitive requested by one of the processors of the structure, PA0 b) a second state in which it processes a local request internal to the circuit concerning only tasks for which it is responsible (expiry of a timer or occurrence of a hardware event), PA0 c) a third state in which it is awaiting processing. PA0 request for access to the real time operator by the structure to process a primitive, this mode comprising verification beforehand by the structure of free access to the real time operator and subsequent hardware response to said verification from the real time operator to the structure, PA0 if the real time operator is free, sending of the code and of the parameters of the primitive to the real time operator merely by writing the real time operator addressing area, PA0 execution by the real time operator after acquisition of said codes and of said parameters of an operational sequence relating to the primitive, PA0 the decision by the real time operator, on the basis of said primitive and of the real time context: PA0 reading of the real time operator response by the processor which requested the primitive and by the processors which have received an interrupt, at the real time operator address. PA0 priority number, PA0 time protection, PA0 etc. PA0 a local event known only to the associated processor (only tasks of the associated processor can manipulate or await this event), PA0 a global event (any task of the multiprocessor structure can manipulate or await this event). PA0 active resources or processors, PA0 clock resource, PA0 passive resources (system element, subroutine or non-sharable hardware). PA0 the passive resource constitutes the mechanism for controlled sharing of possession of a hardware or software element, PA0 the clock resource and the active resources are managed by the RTO but they cannot be manipulated directly by primitives. PA0 a timer, PA0 a resource, PA0 an event, PA0 a cycle. PA0 a) The primitives associated with tasks which use the processor to communicate with the RTO are indicated hereinafter with the associated objects in parentheses: PA0 b) The primitives associated with resources (not sharable by the processors) comprise at least: PA0 c) The primitives associated with events comprise at least: PA0 local primitives which are requested by a processor Pi and concern only the processor Pi (example: processor Pi requests activation of a task Tj on processor Pi), PA0 global primitives which are requested by a processor Pi and concern all the processors Pj of the multiprocessor structure (example: processor Pi requests that the status of the global event "EVK" is changed to "occurred", which may activate tasks on any processor of the structure), PA0 remote primitives which are requested by a processor Pi and concern only another processor Pj (i not equal to j) of the multiprocessor structure (example: processor Pi requests activation of a task TK on processor Pj).
The kernel virtual machine is accessible from higher level machines and, through the latter, from tasks submitted by users.
Above the kernel are subsystems which create tasks and submit them to the kernel for execution.
From the point of view of the kernel a task represents a job to be executed, that is to say the combination of a program and data to which it applies. The context of a task is the set of all information accessible to it, that it modifies or which may condition its execution. The program of a task cannot distinguish between two identical contexts. A task can therefore be interrupted at any point and restarted later without affecting the processing that it performs, provided that its context is restored to the state in which it was interrupted.
From the point of view of the kernel a task can be in either of the following two fundamental states:
A resource is a component of a data processing system that can be individually allocated to a task; a resource is said to be preemptible if it is released under the control of the system or non-preemptible if it is released under the control of the user task.
In multiprocessor architectures, and especially in multimicroprocessor architectures, implementing the kernel virtual machine by programming a machine language of the system has a number of drawbacks associated in particular with the power (lack of power) of the microprocessors which yields mediocer performance (excessively long execution times, for example) incompatible with some applications and in particular with real time applications of the kind used by systems on board aircraft, for example, in particular as aids to aircraft control and navigation.
It should be borne in mind that the recent rapid developments in aircraft performance are due in no small part to the proliferation of digital electronics.
Digital electronics implies a severe real time context and attempts to implement the real time kernal at the software level are not a good match to the requirements of an avionics type real time environment.
This is the case, for example, with the device described in the patent DE-A-3 105 527 which implements a real time executive kernel using a dedicated machine adapted to perform algorithms executed in the primitives of said kernel.
With a view to eliminating these drawbacks there have already been proposals, for example in the French patent publication No 2,604,543, to implement a real time executive kernel using a microprogrammed and hard wired logic machine dedicated to the algorithms executed in the primitives of the kernel. This machine is similar to a coprocessor associated with the system and in which the objects managed, which may comprise tasks, hardware and software events, resources and time, are associated with a series of basic primitives which can be combined to obtain the primitives of the kernel implemented on the system for a given application, these primitives constituting the kernel that the processors use to enable the machine to manage the tasks for carrying out the functions.
This system has the advantages that it responds specifically to the requirements of onboard data processing in an appropriate real time environment and that it provides:
However, this solution is limited in terms of performance because it employs a single machine to be used by all the processors of the multiprocessor structure.
A particular object of the invention is to circumvent this problem in such a way as to enhance the performance of the system.